#pragma once

#include "adalog/LogAppender.h"
#include "adalog/appender/AsyncProxyAppender.h"
#include <filesystem>


namespace adalog 
{
    class AsyncRollFileAppender : public LogAppender
    {
    public:
        AsyncRollFileAppender(const std::filesystem::path& file_path, size_t max_size);
        void Append(const char* data, size_t len) override;

    private:
        LogAppender::Ptr roll_file_appender_;
        AsyncProxyAppender async_proxy_;
    };
} // namespace adalog